From: Jan Djärv Date: Fri, 28 Jun 2002 19:41:21 +0000 (+0000) Subject: (struct x_output): Add focus_state. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~56490 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=e5cd5390a3133b14355949b5f154def83a078861;p=emacs.git (struct x_output): Add focus_state. --- diff --git a/src/xterm.h b/src/xterm.h index a0da573f800..d5b01aec97f 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -618,6 +618,11 @@ struct x_output these may differ because this does not take into account possible menubar. y_pixels_diff is with menubar height included */ int y_pixels_outer_diff; + + /* Keep track of focus. May be EXPLICIT if we received a FocusIn for this + frame, or IMPLICIT if we received an EnterNotify. + FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ + int focus_state; }; enum @@ -631,6 +636,19 @@ enum FULLSCREEN_MOVE_WAIT = 8, }; +enum +{ + /* Values for focus_state, used as bit mask. + EXPLICIT means if we received a FocusIn for the frame and know it has + the focus. IMPLICIT means we recevied an EnterNotify and the frame + may have the focus if no window manager is running. + FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ + FOCUS_NONE = 0, + FOCUS_IMPLICIT = 1, + FOCUS_EXPLICIT = 2 +}; + + /* Return the X window used for displaying data in frame F. */ #define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc)